<?php

if(!pdo_fieldexists('micro_event', 'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('micro_event')." ADD `uniacid` int(11) ;");
}

if(!pdo_fieldexists('micro_eventsetting', 'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('micro_eventsetting')." ADD `uniacid` int(11) ;");
}

$sql = "
CREATE TABLE IF NOT EXISTS " . tablename('micro_eventuser') . " (
`event_id` int(10) unsigned  AUTO_INCREMENT,
`event_userid` varchar(100),
`event_time` date,
`event_title` varchar(40) NOT NULL,
`event_content` text,
`highlight` boolean,
 PRIMARY KEY (`event_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;";
pdo_query($sql);